<!DOCTYPE html><html lang="zh-CN" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"><title>无人深空 - I am alone, but I don't feel lonely.</title><meta name="author" content="zcm"><meta name="copyright" content="zcm"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta property="og:type" content="website">
<meta property="og:title" content="无人深空">
<meta property="og:url" content="https://gitee.com/zcmmmm/zcmmmm/page/3/index.html">
<meta property="og:site_name" content="无人深空">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://s2.loli.net/2022/09/22/36LN4kcjYOd9HT8.jpg">
<meta property="article:author" content="zcm">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://s2.loli.net/2022/09/22/36LN4kcjYOd9HT8.jpg"><link rel="shortcut icon" href="/img/favicon.png"><link rel="canonical" href="https://gitee.com/zcmmmm/zcmmmm/page/3/"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="preconnect" href="//busuanzi.ibruce.info"/><link rel="stylesheet" href="/css/index.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/node-snackbar/dist/snackbar.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox.min.css" media="print" onload="this.media='all'"><script>const GLOBAL_CONFIG = { 
  root: '/',
  algolia: undefined,
  localSearch: {"path":"/search.xml","preload":false,"languages":{"hits_empty":"找不到您查询的内容：${query}"}},
  translate: undefined,
  noticeOutdate: undefined,
  highlight: {"plugin":"highlighjs","highlightCopy":true,"highlightLang":true,"highlightHeightLimit":200},
  copy: {
    success: '复制成功',
    error: '复制错误',
    noSupport: '浏览器不支持'
  },
  relativeDate: {
    homepage: false,
    post: false
  },
  runtime: '天',
  date_suffix: {
    just: '刚刚',
    min: '分钟前',
    hour: '小时前',
    day: '天前',
    month: '个月前'
  },
  copyright: undefined,
  lightbox: 'fancybox',
  Snackbar: {"chs_to_cht":"你已切换为繁体","cht_to_chs":"你已切换为简体","day_to_night":"你已切换为深色模式","night_to_day":"你已切换为浅色模式","bgLight":"#49b1f5","bgDark":"#1f1f1f","position":"bottom-left"},
  source: {
    justifiedGallery: {
      js: 'https://cdn.jsdelivr.net/npm/flickr-justified-gallery/dist/fjGallery.min.js',
      css: 'https://cdn.jsdelivr.net/npm/flickr-justified-gallery/dist/fjGallery.min.css'
    }
  },
  isPhotoFigcaption: false,
  islazyload: false,
  isAnchor: false
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
  title: '无人深空',
  isPost: false,
  isHome: true,
  isHighlightShrink: false,
  isToc: false,
  postUpdate: '2023-05-18 19:46:05'
}</script><noscript><style type="text/css">
  #nav {
    opacity: 1
  }
  .justified-gallery img {
    opacity: 1
  }

  #recent-posts time,
  #post-meta time {
    display: inline !important
  }
</style></noscript><script>(win=>{
    win.saveToLocal = {
      set: function setWithExpiry(key, value, ttl) {
        if (ttl === 0) return
        const now = new Date()
        const expiryDay = ttl * 86400000
        const item = {
          value: value,
          expiry: now.getTime() + expiryDay,
        }
        localStorage.setItem(key, JSON.stringify(item))
      },

      get: function getWithExpiry(key) {
        const itemStr = localStorage.getItem(key)

        if (!itemStr) {
          return undefined
        }
        const item = JSON.parse(itemStr)
        const now = new Date()

        if (now.getTime() > item.expiry) {
          localStorage.removeItem(key)
          return undefined
        }
        return item.value
      }
    }
  
    win.getScript = url => new Promise((resolve, reject) => {
      const script = document.createElement('script')
      script.src = url
      script.async = true
      script.onerror = reject
      script.onload = script.onreadystatechange = function() {
        const loadState = this.readyState
        if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
        script.onload = script.onreadystatechange = null
        resolve()
      }
      document.head.appendChild(script)
    })
  
      win.activateDarkMode = function () {
        document.documentElement.setAttribute('data-theme', 'dark')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
        }
      }
      win.activateLightMode = function () {
        document.documentElement.setAttribute('data-theme', 'light')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
        }
      }
      const t = saveToLocal.get('theme')
    
          if (t === 'dark') activateDarkMode()
          else if (t === 'light') activateLightMode()
        
      const asideStatus = saveToLocal.get('aside-status')
      if (asideStatus !== undefined) {
        if (asideStatus === 'hide') {
          document.documentElement.classList.add('hide-aside')
        } else {
          document.documentElement.classList.remove('hide-aside')
        }
      }
    
    const detectApple = () => {
      if(/iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)){
        document.documentElement.classList.add('apple')
      }
    }
    detectApple()
    })(window)</script><link rel="stylesheet" href="/css/categories.css?v1"><link rel="stylesheet" href="/css/navigation.css?v1"><link rel="stylesheet" href="/css/custom.css?v1"><meta name="generator" content="Hexo 6.3.0"></head><body><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="avatar-img is-center"><img src="https://s2.loli.net/2022/09/22/36LN4kcjYOd9HT8.jpg" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="sidebar-site-data site-data is-center"><a href="/archives/"><div class="headline">文章</div><div class="length-num">43</div></a><a href="/tags/"><div class="headline">标签</div><div class="length-num">25</div></a><a href="/categories/"><div class="headline">分类</div><div class="length-num">11</div></a></div><hr/><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> 时间轴</span></a></div><div class="menus_item"><a class="site-page" href="/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></div></div></div></div><div class="page" id="body-wrap"><header class="not-top-img" id="page-header"><nav id="nav"><span id="blog_name"><a id="site-name" href="/">无人深空</a></span><div id="menus"></div><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> 时间轴</span></a></div><div class="menus_item"><a class="site-page" href="/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></div></div><div id="nav-right"><div id="search-button"><a class="site-page social-icon search"><i class="fas fa-search fa-fw"></i></a></div><div id="toggle-menu"><a class="site-page"><i class="fas fa-bars fa-fw"></i></a></div></div></nav></header><main class="layout" id="content-inner"><div class="recent-posts" id="recent-posts"><div class="recent-post-item"><div class="post_cover left"><a href="/2022/10/15/Nginx%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/" title="Nginx基础知识"><img class="post_bg" src="https://study-record-images.oss-cn-beijing.aliyuncs.com/Java/Nginx/Nginx.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Nginx基础知识"></a></div><div class="recent-post-info"><a class="article-title" href="/2022/10/15/Nginx%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/" title="Nginx基础知识">Nginx基础知识</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2022-10-15T01:47:38.000Z" title="发表于 2022-10-15 09:47:38">2022-10-15</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/Others/">Others</a></span></div><div class="content">Nginx基础篇1.Nginx 简介
Nginx 概述

Nginx (engine x) 是一个高性能的 HTTP 和反向代理服务器
特点是占有内存少，并发能力强
事实上 nginx 的并发能力确实在同类型的网页服务器中表现较好，中国大陆使用 nginx 网站用户有：百度、京东、新浪、网易、腾讯、淘宝等


Nginx 作为 web 服务器

Nginx 可以作为静态页面的 web 服务器，同时还支持 CGI 协议的动态语言，比如 perl、php 等。但是不支持 java
Java 程序只能通过与 tomcat 配合完成
Nginx 专为性能优化而开发， 性能是其最重要的考量，实现上非常注重效率 ，能经受高负载的考验
有报告表明能支持高达 50,000 个并发连接数


正向代理

Nginx 不仅可以做反向代理，实现负载均衡，还能用作正向代理来进行上网等功能
正向代理：如果把局域网外的 Internet 想象成一个巨大的资源库，则局域网中的客户端要访问 Internet，则需要通过代理服务器来访问，这种代理服务就称为正向代理



反向代理

反向代理，其实客户端对代理是无感知的 ...</div></div></div><div class="recent-post-item"><div class="post_cover left"><a href="/2022/10/14/Redis%E9%9D%A2%E7%BB%8F/" title="Redis面经"><img class="post_bg" src="https://study-record-images.oss-cn-beijing.aliyuncs.com/Java/Redis/Redis.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Redis面经"></a></div><div class="recent-post-info"><a class="article-title" href="/2022/10/14/Redis%E9%9D%A2%E7%BB%8F/" title="Redis面经">Redis面经</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2022-10-14T10:43:08.000Z" title="发表于 2022-10-14 18:43:08">2022-10-14</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/%E9%9D%A2%E7%BB%8F/">面经</a><i class="fas fa-angle-right article-meta-link"></i><a class="article-meta__categories" href="/categories/DataBase/">DataBase</a></span></div><div class="content">Redis 面经
Redis 是一个使用 C 语言写成的，开源的高性能 key-value 非关系缓存数据库
支持存储的 value 类型相对更多，包括 string(字符串)、list(链表)、set(集合)、zset(sorted set --有序集合)、hash（哈希类型）
Redis 的数据都基于缓存的，每秒可以处理超过 10 万次读写操作，是已知性能最快的 Key-Value DB
Redis 也可以实现数据写入磁盘中，保证了数据的安全不丢失
Redis 的操作是原子性的，因为 Redis 是单线程的
Redis 本身提供的所有 API 都是原子操作，Redis 中的事务其实是要保证批量操作的有序性，不受其他客户端命令干扰（不能保证原子性）

1.Redis 单线程原理
首先必须明确，Redis 单线程指的是网络请求模块使用了一个线程（其他模块仍用了多个线程）
并不是一个线程完成了所有功能
原理上，其采用了利用 epoll 的多路复用特性，因此可以采用单线程处理其网络请求
Redis 是单进程单线程的，redis 利用队列技术将并发访问变为串行访问， 消除了传统数据库串行控制 ...</div></div></div><div class="recent-post-item"><div class="post_cover left"><a href="/2022/10/12/Redis6%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/" title="Redis6基础知识"><img class="post_bg" src="https://study-record-images.oss-cn-beijing.aliyuncs.com/Java/Redis/Redis.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Redis6基础知识"></a></div><div class="recent-post-info"><a class="article-title" href="/2022/10/12/Redis6%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/" title="Redis6基础知识">Redis6基础知识</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2022-10-12T01:27:08.000Z" title="发表于 2022-10-12 09:27:08">2022-10-12</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/%E9%9D%A2%E7%BB%8F/">面经</a><i class="fas fa-angle-right article-meta-link"></i><a class="article-meta__categories" href="/categories/DataBase/">DataBase</a></span></div><div class="content">Redis6 入门到精通1.NoSQL数据库简介
技术发展

技术的分类

解决功能性的问题：Java、Jsp、RDBMS、Tomcat、HTML、Linux、JDBC、SVN
解决扩展性的问题：Struts、Spring、SpringMVC、Hibernate、Mybatis
解决性能的问题：NoSQL、Java线程、Hadoop、Nginx、MQ、ElasticSearch


Web1.0 时代

数据访问量很有限，用一夫当关的高性能的单点服务器可以解决大部分问题



Web2.0 时代

随着 Web2.0 的时代的到来，用户访问量大幅度提升，同时产生了大量的用户数据
加上后来的智能移动设备的普及，所有的互联网平台都面临了巨大的性能挑战



解决 CPU 及内存压力 


解决 IO 压力




NoSQL 数据库

NoSQL 概述

NoSQL(NoSQL &#x3D; Not Only SQL )，意即不仅仅是 SQL，泛指非关系型的数据库 
NoSQL 不依赖业务逻辑方式存储，而以简单的 key-value 模式存储
因此大大的增加了数据库的扩展能力

不遵循 S ...</div></div></div><div class="recent-post-item"><div class="post_cover left"><a href="/2022/10/11/JVM%20%E4%B8%8B%E7%AF%87-%E6%80%A7%E8%83%BD%E7%9B%91%E6%8E%A7%E4%B8%8E%E8%B0%83%E4%BC%98%E7%AF%87/" title="JVM 下篇-性能监控与调优篇"><img class="post_bg" src="https://study-record-images.oss-cn-beijing.aliyuncs.com/Java/JVM/JVM.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="JVM 下篇-性能监控与调优篇"></a></div><div class="recent-post-info"><a class="article-title" href="/2022/10/11/JVM%20%E4%B8%8B%E7%AF%87-%E6%80%A7%E8%83%BD%E7%9B%91%E6%8E%A7%E4%B8%8E%E8%B0%83%E4%BC%98%E7%AF%87/" title="JVM 下篇-性能监控与调优篇">JVM 下篇-性能监控与调优篇</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2022-10-11T00:30:38.000Z" title="发表于 2022-10-11 08:30:38">2022-10-11</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/Java/">Java</a></span></div><div class="content"></div></div></div><div class="recent-post-item"><div class="post_cover left"><a href="/2022/10/08/JVM%20%E4%B8%AD%E7%AF%87-%E5%AD%97%E8%8A%82%E7%A0%81%E4%B8%8E%E7%B1%BB%E7%9A%84%E5%8A%A0%E8%BD%BD%E7%AF%87/" title="JVM 中篇-字节码与类的加载篇"><img class="post_bg" src="https://study-record-images.oss-cn-beijing.aliyuncs.com/Java/JVM/JVM.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="JVM 中篇-字节码与类的加载篇"></a></div><div class="recent-post-info"><a class="article-title" href="/2022/10/08/JVM%20%E4%B8%AD%E7%AF%87-%E5%AD%97%E8%8A%82%E7%A0%81%E4%B8%8E%E7%B1%BB%E7%9A%84%E5%8A%A0%E8%BD%BD%E7%AF%87/" title="JVM 中篇-字节码与类的加载篇">JVM 中篇-字节码与类的加载篇</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2022-10-08T01:00:38.000Z" title="发表于 2022-10-08 09:00:38">2022-10-08</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/Java/">Java</a></span></div><div class="content">JVM 中篇-字节码与类的加载篇1.Class 文件结构1.Class 字节码文件结构
      
        
             
            类型 
            名称 
            说明 
            长度 
            数量 
       
       
            魔数
            u4
            magic
            魔数,识别Class文件格式
            4个字节     
            1
       
       
            版本号
            u2
            minor_version
            副版本号(小版本)
            2个字节     
            1
       
       
            u2
            major_version
            主版本号(大版本)
          ...</div></div></div><div class="recent-post-item"><div class="post_cover left"><a href="/2022/10/07/JVM%20%E7%95%AA%E5%A4%96-%E5%9E%83%E5%9C%BE%E5%9B%9E%E6%94%B6%E7%8B%AC%E7%AB%8B%E7%AF%87/" title="JVM 番外-垃圾回收独立篇"><img class="post_bg" src="https://study-record-images.oss-cn-beijing.aliyuncs.com/Java/JVM/JVM.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="JVM 番外-垃圾回收独立篇"></a></div><div class="recent-post-info"><a class="article-title" href="/2022/10/07/JVM%20%E7%95%AA%E5%A4%96-%E5%9E%83%E5%9C%BE%E5%9B%9E%E6%94%B6%E7%8B%AC%E7%AB%8B%E7%AF%87/" title="JVM 番外-垃圾回收独立篇">JVM 番外-垃圾回收独立篇</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2022-10-07T00:29:46.000Z" title="发表于 2022-10-07 08:29:46">2022-10-07</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/Java/">Java</a></span></div><div class="content">JVM 上篇-垃圾回收
看 Java 不同版本新特性

语法层面：Lambda 表达式、switch、自动装箱、自动拆箱、enum、&lt;&gt;……
API 层面：Stream API、新的日期时间、Optional、String、集合框架……
底层优化：JVM 的优化、GC 的变化、元空间、静态域、字符串常量池……



1.垃圾回收概述
垃圾收集，不是 Java 语言的伴生产物。早在 1960 年，第一门开始使用内存动态分配和垃圾收集技术的 Lisp 语言诞生
关于垃圾收集有三个经典问题：

哪些内存需要回收？
什么时候回收？
如何回收？

垃圾收集机制是 Java 的招牌能力，极大地提高了开发效率。如今，垃圾收集几乎成为现代语言的标配，即使经过如此长时间的发展，Java 的垃圾收集机制仍然在不断的演进中，不同大小的设备、不同特征的应用场景，对垃圾收集提出了新的挑战，这当然也是面试的热点
大厂面试题
蚂蚁金服

你知道哪几种垃圾回收器，各自的优缺点，重点讲一下 cms 和 G1？

JVM GC 算法有哪些，目前的 JDK 版本采用什么回收算法？

G1 回收器讲下回收过程 G ...</div></div></div><div class="recent-post-item"><div class="post_cover left"><a href="/2022/09/28/JVM%20%E4%B8%8A%E7%AF%87-%E5%86%85%E5%AD%98%E4%B8%8E%E5%9E%83%E5%9C%BE%E5%9B%9E%E6%94%B6/" title="JVM 上篇-内存与垃圾回收"><img class="post_bg" src="https://study-record-images.oss-cn-beijing.aliyuncs.com/Java/JVM/JVM.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="JVM 上篇-内存与垃圾回收"></a></div><div class="recent-post-info"><a class="article-title" href="/2022/09/28/JVM%20%E4%B8%8A%E7%AF%87-%E5%86%85%E5%AD%98%E4%B8%8E%E5%9E%83%E5%9C%BE%E5%9B%9E%E6%94%B6/" title="JVM 上篇-内存与垃圾回收">JVM 上篇-内存与垃圾回收</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2022-09-28T10:29:46.000Z" title="发表于 2022-09-28 18:29:46">2022-09-28</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/Java/">Java</a></span></div><div class="content">JVM 上篇-内存与垃圾回收1.JVM 与 Java 体系结构1.Java 及 JVM 简介
Java 是跨平台的语言；JVM 是跨语言的平台

Java 是跨平台的语言

 


JVM 是跨语言的平台



字节码

我们平时说的 java 字节码，指的是用 java 语言编译成的字节码。准确的说任何能在 jvm 平台上执行的字节码格式都是一样的。所以应该统称为：jvm 字节码
不同的编译器，可以编译出相同的字节码文件，字节码文件也可以在不同的 JVM 上运行
Java 虚拟机与 Java 语言并没有必然的联系，它只与特定的二进制文件格式—Class 文件格式所关联，Class 文件中包含了 Java 虚拟机指令集（或者称为字节码、Bytecodes）和符号表，还有一些其他辅助信息


多语言混合编程

Java 平台上的多语言混合编程正成为主流，通过特定领域的语言去解决特定领域的问题是当前软件开发应对日趋复杂的项目需求的一个方向
试想在一个项目之中，并行处理用 Clojure 语言编写，展示层使用 JRuby&#x2F;Rails，中间层则是 Java，每个应用层都将使用不同的编 ...</div></div></div><div class="recent-post-item"><div class="post_cover left"><a href="/2022/09/24/JUC%E5%B9%B6%E5%8F%91%E7%BC%96%E7%A8%8B/" title="JUC并发编程"><img class="post_bg" src="https://study-record-images.oss-cn-beijing.aliyuncs.com/Java/JUC/JUC.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="JUC并发编程"></a></div><div class="recent-post-info"><a class="article-title" href="/2022/09/24/JUC%E5%B9%B6%E5%8F%91%E7%BC%96%E7%A8%8B/" title="JUC并发编程">JUC并发编程</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2022-09-24T02:57:46.000Z" title="发表于 2022-09-24 10:57:46">2022-09-24</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/Java/">Java</a></span></div><div class="content">JUC 并发编程1. Java JUC 简介
JUC 是什么：java 在并发编程中使用的工具包-java.util.concurrent、java.util.concurrent.atomic、java.util.concurrent.locks（均由 Doug Lea 开发）
在 Java 5.0 提供了 java.util.concurrent （简称JUC ）包，在此包中增加了在并发编程中很常用的实用工具类，用于定义类似于线程的自定义子系统，包括线程池、异步 IO 和轻量级任务框架。提供可调的、灵活的线程池。还提供了设计用于多线程上下文中的 Collection 实现等

前置知识：IDEA 工具、lombok 插件、Java8 新特性（主要是 lambda 表达式）、JVM 入门（主要是内存模型）


2. 线程基础知识复习
前置知识

为什么高并发越来越重要：摩尔定律失效、充分利用 CPU 性能
高并发缺点：线程安全问题、线程锁问题、线程性能问题


线程的开始

同步方法 Thread.start() 调用 native 方法 start0()，对应 3 个底层源码 th ...</div></div></div><div class="recent-post-item"><div class="post_cover left"><a href="/2022/09/23/SpringBoot2%E5%85%A5%E9%97%A8-02/" title="SpringBoot2入门-02"><img class="post_bg" src="https://study-record-images.oss-cn-beijing.aliyuncs.com/Java/Spring/Spring.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="SpringBoot2入门-02"></a></div><div class="recent-post-info"><a class="article-title" href="/2022/09/23/SpringBoot2%E5%85%A5%E9%97%A8-02/" title="SpringBoot2入门-02">SpringBoot2入门-02</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2022-09-23T04:09:23.000Z" title="发表于 2022-09-23 12:09:23">2022-09-23</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/Spring/">Spring</a></span></div><div class="content">45、web实验-抽取公共页面官方文档 - Template Layout

公共页面/templates/common.html

&lt;!DOCTYPE html&gt;&lt;html lang=&quot;en&quot; xmlns:th=&quot;http://www.thymeleaf.org&quot;&gt;&lt;!--注意要添加xmlns:th才能添加thymeleaf的标签--&gt;&lt;head th:fragment=&quot;commonheader&quot;&gt;    &lt;!--common--&gt;    &lt;link href=&quot;css/style.css&quot; th:href=&quot;@&#123;/css/style.css&#125;&quot; rel=&quot;stylesheet&quot;&gt;    &lt;link href=&quot;css/style-responsive.css&quot; th:href=&quot;@&#123;/css/style-responsive. ...</div></div></div><div class="recent-post-item"><div class="post_cover left"><a href="/2022/09/23/SpringBoot2%E5%85%A5%E9%97%A8-01/" title="SpringBoot2入门-01"><img class="post_bg" src="https://study-record-images.oss-cn-beijing.aliyuncs.com/Java/Spring/Spring.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="SpringBoot2入门-01"></a></div><div class="recent-post-info"><a class="article-title" href="/2022/09/23/SpringBoot2%E5%85%A5%E9%97%A8-01/" title="SpringBoot2入门-01">SpringBoot2入门-01</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2022-09-23T04:08:14.000Z" title="发表于 2022-09-23 12:08:14">2022-09-23</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/Spring/">Spring</a></span></div><div class="content">SpringBoot2高层框架：底层为 Spring Framework，用于整合 Spring 框架
微服务开发
﻿## 01、基础入门-SpringBoot2 课程介绍

Spring Boot 2 核心技术

Spring Boot 2 响应式编程



学习要求
熟悉 Spring 基础
熟悉 Maven 使用


环境要求
Java8 及以上
Maven 3.3 及以上


学习资料
Spring官网
Spring Boot官网
Spring Boot官方文档
本课程文档地址
源码地址



02、基础入门-Spring 生态圈Spring 能做什么Spring 的能力
Spring 的生态覆盖了：

web开发
数据访问
安全控制
分布式
消息服务
移动开发
批处理
……

Spring5 重大升级
响应式编程



内部源码设计

基于 Java8 的一些新特性，如：接口默认实现、重新设计源码架构
为什么用 SpringBoot
Spring Boot makes it easy to create stand-alone, production-grade Spring ...</div></div></div><nav id="pagination"><div class="pagination"><a class="extend prev" rel="prev" href="/page/2/#content-inner"><i class="fas fa-chevron-left fa-fw"></i></a><a class="page-number" href="/">1</a><a class="page-number" href="/page/2/#content-inner">2</a><span class="page-number current">3</span><a class="page-number" href="/page/4/#content-inner">4</a><a class="page-number" href="/page/5/#content-inner">5</a><a class="extend next" rel="next" href="/page/4/#content-inner"><i class="fas fa-chevron-right fa-fw"></i></a></div></nav></div><div class="aside-content" id="aside-content"><div class="card-widget card-info"><div class="is-center"><div class="avatar-img"><img src="https://s2.loli.net/2022/09/22/36LN4kcjYOd9HT8.jpg" onerror="this.onerror=null;this.src='/img/friend_404.gif'" alt="avatar"/></div><div class="author-info__name">zcm</div><div class="author-info__description"></div></div><div class="card-info-data site-data is-center"><a href="/archives/"><div class="headline">文章</div><div class="length-num">43</div></a><a href="/tags/"><div class="headline">标签</div><div class="length-num">25</div></a><a href="/categories/"><div class="headline">分类</div><div class="length-num">11</div></a></div></div><div class="sticky_layout"><div class="card-widget card-categories"><div class="item-headline">
            <i class="fas fa-folder-open"></i>
            <span>分类</span>
            
            </div>
            <ul class="card-category-list" id="aside-cat-list">
            <li class="card-category-list-item "><a class="card-category-list-link" href="/categories/Algorithm/"><span class="card-category-list-name">Algorithm</span><span class="card-category-list-count">1</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/Android/"><span class="card-category-list-name">Android</span><span class="card-category-list-count">1</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/Applet/"><span class="card-category-list-name">Applet</span><span class="card-category-list-count">4</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/DataBase/"><span class="card-category-list-name">DataBase</span><span class="card-category-list-count">3</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/Java/"><span class="card-category-list-name">Java</span><span class="card-category-list-count">11</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/Others/"><span class="card-category-list-name">Others</span><span class="card-category-list-count">7</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/Spring/"><span class="card-category-list-name">Spring</span><span class="card-category-list-count">8</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/Tips/"><span class="card-category-list-name">Tips</span><span class="card-category-list-count">2</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/%E4%B8%AD%E9%97%B4%E4%BB%B6/"><span class="card-category-list-name">中间件</span><span class="card-category-list-count">2</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/%E5%A4%A7%E6%95%B0%E6%8D%AE/"><span class="card-category-list-name">大数据</span><span class="card-category-list-count">4</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/%E9%9D%A2%E7%BB%8F/"><span class="card-category-list-name">面经</span><span class="card-category-list-count">14</span></a></li>
            </ul></div><div class="card-widget card-archives"><div class="item-headline"><i class="fas fa-archive"></i><span>归档</span><a class="card-more-btn" href="/archives/" title="查看更多">
    <i class="fas fa-angle-right"></i></a></div><ul class="card-archive-list"><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2023/05/"><span class="card-archive-list-date">五月 2023</span><span class="card-archive-list-count">1</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2023/04/"><span class="card-archive-list-date">四月 2023</span><span class="card-archive-list-count">3</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2023/03/"><span class="card-archive-list-date">三月 2023</span><span class="card-archive-list-count">1</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2022/12/"><span class="card-archive-list-date">十二月 2022</span><span class="card-archive-list-count">2</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2022/11/"><span class="card-archive-list-date">十一月 2022</span><span class="card-archive-list-count">3</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2022/10/"><span class="card-archive-list-date">十月 2022</span><span class="card-archive-list-count">16</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2022/09/"><span class="card-archive-list-date">九月 2022</span><span class="card-archive-list-count">11</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2020/08/"><span class="card-archive-list-date">八月 2020</span><span class="card-archive-list-count">4</span></a></li></ul></div><div class="card-widget card-webinfo"><div class="item-headline"><i class="fas fa-chart-line"></i><span>网站资讯</span></div><div class="webinfo"><div class="webinfo-item"><div class="item-name">文章数目 :</div><div class="item-count">43</div></div><div class="webinfo-item"><div class="item-name">已运行时间 :</div><div class="item-count" id="runtimeshow" data-publishDate="2023-05-18T11:46:04.550Z"><i class="fa-solid fa-spinner fa-spin"></i></div></div><div class="webinfo-item"><div class="item-name">本站总字数 :</div><div class="item-count">508.4k</div></div><div class="webinfo-item"><div class="item-name">本站访客数 :</div><div class="item-count" id="busuanzi_value_site_uv"><i class="fa-solid fa-spinner fa-spin"></i></div></div><div class="webinfo-item"><div class="item-name">本站总访问量 :</div><div class="item-count" id="busuanzi_value_site_pv"><i class="fa-solid fa-spinner fa-spin"></i></div></div><div class="webinfo-item"><div class="item-name">最后更新时间 :</div><div class="item-count" id="last-push-date" data-lastPushDate="2023-05-18T11:46:04.703Z"><i class="fa-solid fa-spinner fa-spin"></i></div></div></div></div></div></div></main><footer id="footer"><div id="footer-wrap"><div class="copyright">&copy;2022 - 2023 By zcm</div><div class="framework-info"><span>框架 </span><a target="_blank" rel="noopener" href="https://hexo.io">Hexo</a><span class="footer-separator">|</span><span>主题 </span><a target="_blank" rel="noopener" href="https://github.com/jerryc127/hexo-theme-butterfly">Butterfly</a></div></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="darkmode" type="button" title="浅色和深色模式转换"><i class="fas fa-adjust"></i></button><button id="hide-aside-btn" type="button" title="单栏和双栏切换"><i class="fas fa-arrows-alt-h"></i></button></div><div id="rightside-config-show"><button id="rightside_config" type="button" title="设置"><i class="fas fa-cog fa-spin"></i></button><button id="go-up" type="button" title="回到顶部"><i class="fas fa-arrow-up"></i></button></div></div><div id="local-search"><div class="search-dialog"><nav class="search-nav"><span class="search-dialog-title">搜索</span><span id="loading-status"></span><button class="search-close-button"><i class="fas fa-times"></i></button></nav><div class="is-center" id="loading-database"><i class="fas fa-spinner fa-pulse"></i><span>  数据库加载中</span></div><div class="search-wrap"><div id="local-search-input"><div class="local-search-box"><input class="local-search-box--input" placeholder="搜索文章" type="text"/></div></div><hr/><div id="local-search-results"></div></div></div><div id="search-mask"></div></div><div><script src="/js/utils.js"></script><script src="/js/main.js"></script><script src="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox.umd.min.js"></script><script src="https://cdn.jsdelivr.net/npm/node-snackbar/dist/snackbar.min.js"></script><script src="/js/search/local-search.js"></script><div class="js-pjax"></div><script src="/js/categories.js?v1"></script><script src="/js/navigation.js?v1"></script><script async data-pjax src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script></div></body></html>